import request from '@/utils/request'

// 查询列表信息
export function getFundAccountList(query) {
  return request({
    url: '/md/cardInfo/list',
    method: 'get',
    params: query
  })
}

// 查询详细
export function fundAccountDetail(cardId) {
  return request({
    url: '/md/cardInfo/' + cardId,
    method: 'get'
  })
}

// 新增
export function addFundAccount(data) {
  return request({
    url: '/md/cardInfo',
    method: 'post',
    data: data
  })
}

// 修改
export function updateFundAccount(data) {
  return request({
    url: '/md/cardInfo',
    method: 'put',
    data: data
  })
}

// 删除
export function delFundAccount(cardId) {
  return request({
    url: '/md/cardInfo/' + cardId,
    method: 'delete'
  })
}

// 修改状态
export function changeFundAccountStatus(data) {
  return request({
    url: '/md/cardInfo/updateStatus',
    method: 'put',
    data: data
  })
}

// 代理提交（撤回）审核
export function applyAudit(data) {
  return request({
    url: '/md/cardInfo/applyAudit',
    method: 'put',
    data: data
  })
}

// 管理员审核
export function adminApplyAudit(data) {
  return request({
    url: '/md/cardInfo/audit',
    method: 'put',
    data: data
  })
}